package com.etlmaster.executor.parser;

import java.util.List;
import java.util.Map;

import com.etlmaster.executor.Job;
import com.etlmaster.executor.JobPool;
import com.etlmaster.executor.utils.XmlParser;


/**
 * 从xml文件中获取程序流程
 * 
 * @author Wugf
 * @date 2016-03-08
 */
public class XmlJobFileLoader extends XmlJobParser{

	
	@Override
	public void init(String jobId, Map<String, Object> params) {
		jobParam=XmlParser.parseXMLUtils(jobId, "proc").get(0);
		rowList=XmlParser.parseXMLUtils(jobId,"step");
	}

	@Override
	public Job builder(String jobId, Map<String, Object> params) {
		
		Job job = JobPool.getJob(jobId);

		XmlJobFileLoader xmlJobDbLoader = new XmlJobFileLoader();

		job = JobBuilder.build(jobId, params, xmlJobDbLoader, job);
		return job;
	}
	
	@Override
	public List<Map<String, Object>> findSenderStepCfg(String stepId){
		return null;
	}
}